package cn.itcast.service.imp;

import cn.itcast.dao.BookDao;
import cn.itcast.dao.impl.BookDaoImpl;
import cn.itcast.pojo.Book;
import cn.itcast.service.BookService;

import java.util.List;

public class BookServiceImpl implements BookService {
    private BookDao bookDao=new BookDaoImpl();
    @Override
    public List<Book> findAll() {
        List<Book> bookList = bookDao.findAll();
        return bookList;
    }

    @Override
    public void delBook(int id) {
        bookDao.delById(id);

    }

    @Override
    public void addBook(Book book) {
        bookDao.addBood(book);
    }
}
